Auto merge of #2407 - alexcrichton:better-failed-auth-error, r=brson
authorbors <bors@rust-lang.org>
Thu, 25 Feb 2016 00:40:22 +0000 (00:40 +0000)
committerbors <bors@rust-lang.org>
Thu, 25 Feb 2016 00:40:22 +0000 (00:40 +0000)
commite7212896dc1b182493a0252a2a126db8be067153
tree52259eadc2c6b5c9155dc19305a977c0772f2988
parent35480d721f2676faef0f6be903f6597b27f57287
parentf66d71636379fc07275119dab8c3db674b9279ad
Auto merge of #2407 - alexcrichton:better-failed-auth-error, r=brson

This commit is an attempt to improve the error message from failed
authentication attempts as well as attempting more usernames. Right now we only
attempt one username, but there are four different possible choices we could
select (including $USER which we weren't previously trying).

This commit tweaks a bunch of this logic and just in general refactors the
with_authentication function.

Closes #2399